/* 通用样式，重置部分默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

header {
    width: 100%;
    background-color: #e60000; /* 设置菜单栏背景为红色 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: relative;
    text-align: center;
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white; /* 标题为白色 */
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.navbar ul li {
    margin-right: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: white; /* 菜单栏文字为白色 */
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #ffd1d1; /* 悬停为浅红 */
}

.login-link {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s ease;
    margin-top: 10px;
}

.login-link:hover {
    color: #ffd1d1; /* 悬停为浅红 */
}

#theme-toggle {
    cursor: pointer;
    color: black; /* 切换主题按钮文字为白色 */
}

#theme-options {
    position: absolute;
    top: 40px;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 10px;
}

.theme-option {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #f8f8f8;
    color: #666;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.theme-option:hover {
    background-color: #e60000;
    color: white;
}

main {
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    text-align: center;
}

.featured-posts {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.post {
    width: calc(50% - 10px);
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.post img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.author {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.excerpt {
    margin-bottom: 10px;
}

.read-more {
    text-decoration: none;
    color: #e60000;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #cc0000;
}

.latest-activities {
    margin-top: 20px;
}

.latest-activities h2 {
    margin-bottom: 10px;
    color: #e60000; /* 最新活动标题颜色为红色 */
}

.activity-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.activity-item img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 10px;
}

footer {
    text-align: center;
    padding: 10px 0;
    background-color: #e60000; /* 底部背景为红色 */
    color: white; /* 底部文字为白色 */
}
/* 搜索框的样式 */
.search-section {
    width: 400px;
    background-color: white;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 0 auto; /* 水平居中 */
}

.search-section input[type="text"] {
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 180px; /* 输入框宽度 */
}

.search-section input[type="submit"] {
    background-color: #e60000;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 10px;
}

.search-section input[type="submit"]:hover {
    background-color: #cc0000;
}
